<?php

namespace app\service\impl;

use app\popo\model\User;
use app\repository\UserRepository;
use app\service\UserService;
use DI\Attribute\Inject;


class UserServiceImpl implements UserService
{
    #[Inject]
    protected UserRepository $userRepository;

    public function login($code) : User
    {
        return $this->userRepository->findOrCreatByOpendId($code);
    }
}